﻿namespace Stopwatch.Core
{
    using System;

    public interface ITimer : IDisposable
    {
        Status Status { get; }

        Time Duration { get; set; }

        Time Runtime { get; }

        DateTime Beginning { get; }

        /// <summary>
        /// if Time less then WarningThreshold, raise Warning.
        /// </summary>
        Time WarningThreshold { get; set; }

        bool Start();

        void Pause();

        void Reset();

        event EventHandler OnPaused;

        event EventHandler OnCompleted;

        event EventHandler OnTick;

        event EventHandler OnWarning;
    }
}
